<style>
    #base-update {
        padding: 20px 25px 25px 0;
    }
</style>
<div class="layui-fluid" id="baseflow-update">
    <form class="layui-form" action="" lay-filter="baseflow-update-form">

        <div class="layui-form-item febs-hide">
            <label class="layui-form-label febs-form-item-require">组织机构id：</label>
            <div class="layui-input-block">
                <input type="text" name="orgId" data-th-value="${qhBasestdMEntity.orgId}">
            </div>
        </div>

        <div class="layui-form-item febs-hide">
            <label class="layui-form-label febs-form-item-require">隐藏流程编号：</label>
            <div class="layui-input-block">
                <input type="text" name="basestdNo" data-th-value="${qhBasestdMEntity.basestdNo}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">机构编码：</label>
            <div class="layui-input-block">
                <input type="text" name="orgId" minlength="4" maxlength="60" data-th-id="${qhBasestdMEntity.orgId}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
            <label class="layui-form-label febs-form-item-require">机构名称：</label>
            <div class="layui-input-block">
                <input type="text" name="orgNameT" minlength="4" maxlength="60" data-th-id="${qhBasestdMEntity.orgNameT}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">单据编码：</label>
            <div class="layui-input-block">
                <input type="text" name="billstdNo"  data-th-id="${qhBasestdMEntity.billstdNo}"
                       autocomplete="off" class="layui-input" disabled="disabled" style="background-color: #cccccc">
            </div>
            <label class="layui-form-label febs-form-item-require">单据分类：</label>
            <div class="layui-input-block">
                <input type="text" name="billstdName"  data-th-id="${qhBasestdMEntity.billstdName}"
                       autocomplete="off" class="layui-input" disabled="disabled" style="background-color: #cccccc">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">类别ID：</label>
            <div class="layui-input-block">
                <input type="text" name="billstdG"  data-th-id="${qhBasestdMEntity.billstdG}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
            <label class="layui-form-label febs-form-item-require">类别名称：</label>
            <div class="layui-input-block">
                <input type="text" name="deptName"  data-th-id="${qhBasestdMEntity.orgNameT}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">创建人：</label>
            <div class="layui-input-block">
                <input type="text" name="grtUser"  data-th-id="${qhBasestdMEntity.grtUser}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
            <label class="layui-form-label febs-form-item-require">修改人：</label>
            <div class="layui-input-block">
                <input type="text" name="lastUser"  data-th-id="${qhBasestdMEntity.lastUser}"
                       autocomplete="off" class="layui-input" readonly=”readonly”  style="background-color: #cccccc">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">流程名称：</label>
            <div class="layui-input-block">
                <input type="text" name="nameT" minlength="4" maxlength="60" data-th-id="${qhBasestdMEntity.nameT}"
                       lay-verify="range|nameT" autocomplete="off" class="layui-input"  >
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"></label>
            <div class="layui-input-block">
                <textarea name="" maxlength="100" class="layui-textarea" readonly="readonly"> </textarea>
            </div>
        </div>
        <div class="layui-form-item febs-hide">
            <button class="layui-btn" lay-submit="" lay-filter="baseflow-update-form-submit" id="submit"></button>
        </div>
    </form>
</div>

<script data-th-inline="javascript">
    layui.use(['febs', 'form', 'xmSelect', 'validate'], function () {
        let $ = layui.$,
            febs = layui.febs,
            layer = layui.layer,
            form = layui.form,
            xmSelect = layui.xmSelect,
            qhBasestdMEntity = [[${qhBasestdMEntity}]],
            validate = layui.validate;

        form.verify(validate);
        form.render();

        initUserValue();


        function initUserValue() {
            form.val("baseflow-update-form", {
                "orgId": qhBasestdMEntity.orgId,
                "orgNameT": qhBasestdMEntity.orgNameT,
                "basestdNo": qhBasestdMEntity.basestdNo,
                "billstdName": qhBasestdMEntity.billstdName,
                "deptName": qhBasestdMEntity.deptName,
                "billstdNo": qhBasestdMEntity.billstdNo,
                "billstdG": qhBasestdMEntity.billstdG,
                "grtUser": qhBasestdMEntity.grtUser,
                "lastUser": qhBasestdMEntity.lastUser,
                "nameT": qhBasestdMEntity.nameT
            });
        }

        form.on('submit(baseflow-update-form-submit)', function (data) {
            if (febs.nativeEqual(data.field, qhBasestdMEntity)) {
                febs.alert.warn('数据未作任何修改！');
                return false;
            }
            febs.post(ctx + 'baseflow/update', data.field, function () {
                layer.closeAll();
                febs.alert.success(qhBasestdMEntity.nameT + ' 流程数据修改成功');
                $('#febs-baseflow').find('#queryBaseFlow').click();
            });
            return false;
        });
    });
</script>